package com.repository;

import com.entity.AttentionTopic;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * @Author：Luohuiyong
 * @Description:
 * @Date: Created in 16:52 2019/1/30
 */
public interface AttentionTopicRepository extends JpaRepository<AttentionTopic,Integer>, JpaSpecificationExecutor<AttentionTopic> {

    Page<AttentionTopic> findAllByUserId(Integer userId, Pageable pageable);

    long countByUserId(Integer userId);

    List<AttentionTopic> findAllByUserId(Integer userId);
}
